import 'package:bubbles/models/api_response.dart';
import 'package:dio/dio.dart';
import 'package:retrofit/http.dart';
import '../../models/version.dart';
import '../dio_client.dart';
import 'http_config.dart';

part 'api_service_retrofit.g.dart';

@RestApi(baseUrl: HttpConfig.baseUrl)
abstract class ApiServiceRetrofit {
  factory ApiServiceRetrofit({Dio? dio, String? baseUrl}) {
    return _ApiServiceRetrofit(DioClient.instance.dio, baseUrl: baseUrl);
  }

  ///获取主页的推荐列表数据
  @POST('/api/web/config/version')
  Future<ApiResponse<Version>> getVersion();
}
